import layout from '@/views/layout.vue'
import home from '@/views/seconds/home.vue'
import find from '@/views/seconds/find.vue'
import message from '@/views/seconds/message.vue'
import my from '@/views/seconds/my.vue'

import detail from '@/views/detail.vue'
import login from '@/views/login.vue'
import register from '@/views/register.vue'
import city from '@/views/city.vue'
import collect from '@/views/collect.vue'
import sale from '@/views/sale.vue'
import search from '@/views/search.vue'

const routes = [
  {
    path: '/',
    component: layout,
    redirect: '/home',
    children: [
      { path: 'home', component: home },
      { path: 'find', component: find },
      { path: 'message', component: message },
      { path: 'my', component: my }
    ]
  },
  { name: 'detail', path: '/detail', component: detail },
  { path: '/login', component: login },
  { path: '/register', component: register },
  { path: '/city', component: city },
  { path: '/collect', component: collect },
  { path: '/sale', component: sale },
  { path: '/search', component: search }
]
export default routes
